package com.itheima.Controller;

import com.itheima.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Scope("prototype") //bean作用域为非单例
@RestController
@RequestMapping("/depts")
public class DeptControllerrr {

    @Autowired
    private DeptService deptService;

    public DeptControllerrr(){
        System.out.println("DeptController constructor ....");
    }

    //省略其他代码...
}